﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace StatsData.Data.Migrations
{
    public partial class add_table_t_work_in_process : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "T_IN_PROCESS_WORK",
                columns: table => new
                {
                    ID = table.Column<string>(type: "VARCHAR2(50)", maxLength: 50, nullable: false),
                    LINE_CODE = table.Column<string>(type: "NVARCHAR2(600)", maxLength: 600, nullable: true),
                    WORK_CODE = table.Column<string>(type: "NVARCHAR2(600)", maxLength: 600, nullable: true),
                    WORK_PUBLISH_TIME = table.Column<DateTime>(type: "TIMESTAMP(7)", nullable: false),
                    WORK_QTY = table.Column<decimal>(type: "NUMBER(18,6)", precision: 18, scale: 6, nullable: false),
                    WORK_OUTPUT_QTY = table.Column<decimal>(type: "NUMBER(18,6)", precision: 18, scale: 6, nullable: false),
                    WORK_OUTPUT_DIFF_QTY = table.Column<decimal>(type: "NUMBER(18,6)", precision: 18, scale: 6, nullable: false),
                    WORK_MATERIAL_SEND_BEGIN_TIME = table.Column<DateTime>(type: "TIMESTAMP(7)", nullable: true),
                    PDT_SAP_GMPS_TIME = table.Column<DateTime>(type: "TIMESTAMP(7)", nullable: true),
                    WIP_DAY_PDT_MATERIAL = table.Column<decimal>(type: "NUMBER(18,6)", precision: 18, scale: 6, nullable: false),
                    CURR_DATE = table.Column<DateTime>(type: "TIMESTAMP(7)", nullable: false),
                    ORG_ID = table.Column<string>(type: "NVARCHAR2(50)", maxLength: 50, nullable: true),
                    CREATE_TIME = table.Column<DateTime>(type: "TIMESTAMP(7)", nullable: true),
                    MODIFY_TIME = table.Column<DateTime>(type: "TIMESTAMP(7)", nullable: true),
                    IS_DELETED = table.Column<bool>(type: "NUMBER(1)", nullable: false),
                    ROW_VERSION = table.Column<int>(type: "NUMBER(10)", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_T_IN_PROCESS_WORK", x => x.ID);
                });

            migrationBuilder.CreateIndex(
                name: "IX_T_IN_PROCESS_WORK_CREATE_TIME",
                table: "T_IN_PROCESS_WORK",
                column: "CREATE_TIME");
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "T_IN_PROCESS_WORK");
        }
    }
}
